class A{
   public void fun(){
          System.out.println("AAA");
      }
}
class B{
	public void fun(){
	  System.out.println("BBB");
	}
}
    class Exam{     
        public static void main (String args[ ]) { 
         System.out.println("Hello Java");
         A a=new A();a.fun();
         B b=new B();b.fun();
     }
}